import { commonUtil } from "../../utils/index.js";
import * as COMMON_CONFIG from "../commonConifg.js"

let MAX_INPUT_PER_DATE, LOGIN_RETRY_TIME, URL, DICT, STATUS, USERS, CONFIG;
try {
  CONFIG = commonUtil.getYamlConfig({
    fileName: "config.yaml",
    folderPath: "config/cloud/",
  });
  DICT = commonUtil.getYamlConfig({
    fileName: "dict.yaml",
    folderPath: "config/cloud/",
  });
  USERS = commonUtil.getYamlConfig({
    fileName: "users.yaml",
    folderPath: "config/cloud/",
  });
  ({ MAX_INPUT_PER_DATE, LOGIN_RETRY_TIME, URL } = CONFIG);
  ({ STATUS } = COMMON_CONFIG);
} catch (e) {
  console.log('配置获取失败，请联系开发者获取用户配置')
  process.exit(1)
}

export { MAX_INPUT_PER_DATE, LOGIN_RETRY_TIME, URL, DICT, STATUS, USERS, CONFIG };

// export const LOGIN_RETRY_TIME = 5; // 登录重试
// export const URL = {
//   BASE_URL: "http://nangang.kontrol.space:9898/phis", // cloud地址
//   LOGIN: "/login.do",
//   LOGIN_CHECK: "j_unieap_security_check.do",
//
//   CAPTCHA: "/Frame/AspCode/ZhuChengXu/AuthenImage.aspx",
//   SET_JIGOU_KESHI: "/Frame/AspCode/ZhuChengXu/ShowSelect.aspx",
//   BASE_PARAM:
//     "/HR_Chronic/AspCode/AnnualExaminationManage/AnnualCheckList/AnnualExaminationRegister.aspx",
//   BASE_PARAM1: "/HyControl/ChooseDangan.aspx?pi=0.6088581111560587",
//   ANNUAL_CHECK_EXISTED: "/HyControl/ChooseDangan.aspx",
//   ANNUAL_LIST:
//     "/HR_Chronic/AspCode/AnnualExaminationManage/AnnualCheckList/AnnualExaminationRegister.aspx",
//   ANNUAL:
//     "/HR_Chronic/AspCode/AnnualExaminationManage/JianKangTiJianGuid/Default.aspx",
// };

// export const CHINESE_MEDICINE_DICT = {
//   IDNum: "身份证",
//   name: "姓名",
//   assessdate: "体检日期",
//   assessment1: "(1)您精力充沛吗？（指精神头足，乐于做事）",
//   assessment2:
//     "(2)您容易疲乏吗？（指体力如何，是否稍微活动一下或做一点家务劳动就感到累）",
//   assessment3: "(3)您容易气短，呼吸短促，接不上气吗？",
//   assessment4: "(4)您说话声音低弱无力吗?（指说话没有力气）",
//   assessment5: "(5)您心情感到闷闷不乐、情绪低沉吗?",
//   assessment6: "(6)您容易精神紧张、焦虑不安吗?（指遇事是否心情紧张）",
//   assessment7: "(7)您因为生活状态改变而感到孤独、失落吗？",
//   assessment8: "(8)您容易感到害怕或受到惊吓吗?",
//   assessment9:
//     "(9)您感到身体超重不轻松吗?(感觉身体沉重)[BMI指数=体重（kg）/身高2（m）]",
//   assessment10: "(10)您眼睛干涩吗?",
//   assessment11: "(11)您手脚发凉吗?（不包含因周围温度低或穿的少导致的手脚发冷）",
//   assessment12:
//     "(12)您胃脘部、背部或腰膝部怕冷吗？（指上腹部、背部、腰部或膝关节等，有一处或多处怕冷）",
//   assessment13:
//     "(13)您比一般人耐受不了寒冷吗？（指比别人容易害怕冬天或是夏天的冷空调、电扇等）",
//   assessment14: "(14)您容易患感冒吗?（指每年感冒的次数）",
//   assessment15: "(15)您没有感冒时也会鼻塞、流鼻涕吗?",
//   assessment16: "(16)您有口粘口腻，或睡眠打鼾吗？",
//   assessment17:
//     "(17)您容易过敏(对药物、食物、气味、花粉或在季节交替、气候变化时)吗?",
//   assessment18: "(18)您的皮肤容易起荨麻疹吗? (包括风团、风疹块、风疙瘩)",
//   assessment19:
//     "(19)您的皮肤在不知不觉中会出现青紫瘀斑、皮下出血吗?（指皮肤在没有外伤的情况下出现青一块紫一块的情况）",
//   assessment20:
//     "(20)您的皮肤一抓就红，并出现抓痕吗?（指被指甲或钝物划过后皮肤的反应）",
//   assessment21: "(21)您皮肤或口唇干吗?",
//   assessment22: "(22)您有肢体麻木或固定部位疼痛的感觉吗？",
//   assessment23: "(23)您面部或鼻部有油腻感或者油亮发光吗?",
//   assessment24: "(24)您面色或目眶晦黯，或出现褐色斑块/斑点吗?",
//   assessment25: "(25)您有皮肤湿疹、疮疖吗？",
//   assessment26: "(26)您感到口干咽燥、总想喝水吗？",
//   assessment27: "(27)您感到口苦或嘴里有异味吗?（指口苦或口臭）",
//   assessment28: "(28)您腹部肥大吗?（指腹部脂肪肥厚)",
//   assessment29:
//     "(29)您吃(喝)凉的东西会感到不舒服或者怕吃(喝)凉的东西吗？（指不喜欢吃凉的食物，或吃了凉的食物后会不舒服）",
//   assessment30:
//     "(30)您有大便黏滞不爽、解不尽的感觉吗?(大便容易粘在马桶或便坑壁上)",
//   assessment31: "(31)您容易大便干燥吗?",
//   assessment32:
//     "(32)您舌苔厚腻或有舌苔厚厚的感觉吗?（如果自我感觉不清楚可由调查员观察后填写）",
//   assessment33: "(33)您舌下静脉瘀紫或增粗吗？（可由调查员辅助观察后填写）",
// };
//
// export const DICT = {
//   CHINESE_MEDICINE_DICT,
// };

// export const STATUS = {
//   UNDO: "未录入",
//   ASSIGNED: "已分配",
//   EXISTED: "已存在",
//   FINISH: "已完成",
//   NOT_BUILD: "未建档",
//   WRONG: "错误",
// };

// export const USERS = {
//   NANGANG: [
//     {
//       username: "ngpgh",
//       password: "NGpgh3762",
//     },
//   ],
// };
// const { LOGIN_RETRY_TIME, URL } = config;
// export { LOGIN_RETRY_TIME, URL };
